package com.example.review;

public class Test06 {
    public static void main(String[] args) {
        Boss boss1 = new Golem("Golem",100);
        Boss boss2 = new Zelos("Zelos",100);

        boss1.attack();
        boss2.attack();

        boss1.move();
        boss2.move();
        
    }
}
    interface Boss{
        void attack();
        void move();
    }
    class Golem implements Boss{
        private String name;
        private int health;

        Golem() {
        }

        public Golem(String name, int health) {
            this.name = name;
            this.health = health;
        }

        @Override
        public void attack() {
            System.out.println(name + "attacking" + health);
        }

        @Override
        public void move() {
            System.out.println(name + " moving："+"curve");

        }
    }

    class Zelos implements Boss{

        private String name;
        private int health;

        public Zelos(String name, int health) {
            this.name = name;
            this.health = health;
        }

        @Override
        public void attack() {
            System.out.println(name + "attacking" + health);
        }

        @Override
        public void move() {
            System.out.println(name + " moving："+"fly");
        }
    }

